import {registerApi} from '@/api/api_chatSocket/chatSocket_Api';
import {MD5, toView} from '@/utils/utils';

// 注册账号
export const register = async (name: string, password: string, email:string): Promise<void> => {
  const registerResult = await registerApi(name, MD5(password), email);
  if (!registerResult) return;
  toView('RegisterSuccess', null, {account:registerResult.data.msg.account});
};
